//
//  UIButton+SWAdd.h
//  EnjoyEasy
//
//  Created by 曾少伟 on 2016/12/3.
//  Copyright © 2016年 腾程－zsw. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger,ImageRotateDirection) {
    ImageRotateDirectionDefult,
    ImageRotateDirectionRight90,
    ImageRotateDirectionLeft90,
};

NS_ASSUME_NONNULL_BEGIN
@interface UIButton (SWAdd)

//@property (nonatomic,strong)UIImageView *goldImgView;

/**
 标题 标题颜色 字体 背景颜色 响应事件

 @param title           <#title description#>
 @param titleColor      <#titleColor description#>
 @param font            <#font description#>
 @param backgroundColor <#backgroundColor description#>
 @param target          <#target description#>
 @param action          <#action description#>

 @return <#return value description#>
 */
+ (instancetype)buttonWithTitle:(NSString *)title
                     titleColor:(UIColor *)titleColor
                           font:(CGFloat)font
                      backgroundColor:(UIColor *)backgroundColor
                         tagart:(id)target
                         action:(SEL)action;

/**
 标题 标题颜色 字体 图片 响应事件

 @param title      <#title description#>
 @param titleColor <#titleColor description#>
 @param font       <#font description#>
 @param imageName  <#imageName description#>
 @param target     <#target description#>
 @param action     <#action description#>

 @return <#return value description#>
 */
+ (instancetype)buttonWithTitle:(NSString *)title
                     titleColor:(UIColor *)titleColor
                           font:(CGFloat)font
                      imageName:(NSString *)imageName
                         tagart:(id)target
                         action:(SEL)action;

/**
 标题 标题颜色 字体 背景图片 响应事件

 @param title               <#title description#>
 @param titleColor          <#titleColor description#>
 @param font                <#font description#>
 @param backgroundImageName <#backgroundImageName description#>
 @param target              <#target description#>
 @param action              <#action description#>

 @return <#return value description#>
 */
+ (instancetype)buttonWithTitle:(NSString *)title
                     titleColor:(UIColor *)titleColor
                           font:(CGFloat)font
                      backgroundImageName:(NSString *)backgroundImageName
                         tagart:(id)target
                         action:(SEL)action;

/**
背景图片 响应事件

 @param backgroundImageName <#backgroundImageName description#>
 @param target              <#target description#>
 @param action              <#action description#>

 @return <#return value description#>
 */
+ (instancetype)buttonWithBackgroundImageName:(NSString *)backgroundImageName
                         tagart:(id)target
                         action:(SEL)action;

/**
 背景图片 响应事件
 
 @param backgroundImage <#backgroundImageName description#>
 @param target              <#target description#>
 @param action              <#action description#>
 
 @return <#return value description#>
 */
+ (instancetype)buttonWithBackgroundImage:(UIImage *)backgroundImage
                                       tagart:(id)target
                                       action:(SEL)action;

+ (instancetype)buttonWithBackgroundImage:(UIImage *)backgroundImage;

- (void)setImageEdgeInsetsWithOffestX:(CGFloat)offsetX YOffsetY:(CGFloat)offsetY;

/**
 设置btn的内容图片

 @param paiStr          <#paiStr description#>
 @param offsetX         <#offsetX description#>
 @param offsetY         <#offsetY description#>
 @param scale           <#scale description#>
 @param isConverToBigMj <#isConverToBigMj description#>
 */
- (void)setContentImageWithPaiStr:(NSString *)paiStr
                          offestX:(CGFloat)offsetX
                          offsetY:(CGFloat)offsetY
                         imgScale:(CGFloat)scale
                  isConverToBigMj:(BOOL)isConverToBigMj;
/**
 设置btn的内容图片
 */
- (void)setContentImageWithPaiStr:(NSString *)paiStr
                          offestX:(CGFloat)offsetX
                          offsetY:(CGFloat)offsetY
                         imgScale:(CGFloat)scale
                  isConverToBigMj:(BOOL)isConverToBigMj
                           rotate:(ImageRotateDirection)rotate;

- (void)setImageWithPlist:(NSString *)plist imgName:(NSString *)imageName;
- (void)setBackgroundWithPlist:(NSString *)plist imgName:(NSString *)imageName;


- (void)setContentImage:(UIImage *)image
//                imgScale:(CGFloat)scale
                offestX:(CGFloat)offsetX
                offsetY:(CGFloat)offsetY
                 rotate:(ImageRotateDirection)rotate;
@end

NS_ASSUME_NONNULL_END
